import java.util.Scanner;

public class Main {
    static int N,D;
    static int[] v;
    static double[] x;
    static double[] y;
    public static void main(String[] args) throws Exception{
        //输入
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        x = new double[N];
        y = new double[N];
        v = new int[N];
        for (int i = 0; i < N; i++) {
            x[i] = scanner.nextDouble();
            y[i] = scanner.nextDouble();
        }
        D = scanner.nextInt();

        //以下标0开始炸开
        dfs(0);

        //输出
        for (int i = 0; i < N; i++) {
            System.out.println(v[i]==1?1:0);
        }
    }

    //以下标i开始炸开
    private static void dfs(int i) {
        //已经遍历就记录下来
        v[i] = 1;
        for (int j = 0; j < N; j++) {
            //为了防止死循环
            if(v[j]==1) continue;

            if(dis(j,i)) {
                dfs(j);
            }
        }
    }

    //判断下标为j和下标为i的元素距离是否符合要求
    private static boolean dis(int j, int i) {
        if(Math.sqrt( Math.pow(x[j]-x[i],2)+Math.pow(y[j]-y[i],2) )<=D) return true;
        return false;
    }
}
